// 文件位置: PersonalFinanceManager/src/main/java/FinanceRecord.java

import java.util.Date;

public class FinanceRecord {
    private Date date;
    private double amount;
    private String category;
    private String remark;

    public FinanceRecord(Date date, double amount, String category, String remark) {
        this.date = date;
        this.amount = amount;
        this.category = category;
        this.remark = remark;
    }

    // Getters and Setters
    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return String.format("Date: %s, Amount: %.2f, Category: %s, Remark: %s", date, amount, category, remark);
    }
}
